home *** CD-ROM | disk | FTP | other *** search
- /* types */
-
- #define AUTO auto /* automatic variables */
- #define AGLOBAL ; /* global (project-scope) */
- #define MODULE static /* external static (file-scope) */
- #define PERSIST static /* internal static (function-scope) */
- typedef signed char ABOOL; /* 8-bit signed quantity (replaces BOOL) */
- typedef signed char SBYTE; /* 8-bit signed quantity (replaces Amiga BYTE) */
- typedef signed short SWORD; /* 16-bit signed quantity (replaces Amiga WORD) */
- typedef signed long SLONG; /* 32-bit signed quantity (same as LONG) */
- #define elif else if
-
- #define ASM __asm
- #define REG(x) register __ ## x
-
- #ifdef __STORM__
- #define __inline
- #define chip
- #define EXIT_SUCCESS 0
- #define EXIT_FAILURE 20
- AGLOBAL ULONG stcl_d(STRPTR out, ULONG val);
- AGLOBAL ULONG stcl_h(STRPTR out, ULONG val);
- #endif
- #ifdef LATTICE
- #define CONST_STRPTR STRPTR
- #endif
-
- // defined by AmigaOS are: IMPORT, UBYTE, UWORD, ULONG.
-
- #define GID_12_LY1 0 // root layout
- #define GID_12_CH1 1 // chooser 1 (icon type)
- #define GID_12_CB1 2 // checkbox 1 (optimize?)
- #define GID_12_CB2 3 // checkbox 2 (planar?)
- #define GID_12_ST1 4 // string 1 (pathname(s))
- #define GID_12_ST2 5 // string 2 (status)
- #define GID_12_BU1 6 // button 1 (pathname(s) ASL)
- #define GID_12_BU2 7 // button 2 (menu)
- #define GID_12_BU3 8 // button 3 (process)
- #define GID_12_BU4 9 // button 4 (stop)
- #define GIDS_12 GID_12_BU4
-
- #define BUG 0
- #define COM 1
- #define ENH 2
-
- #define FONTX 8
- #define FONTY 8
-
- // ASCII values (vanillakey)
- #define TAB 9 /* tab */
- #define LF 10 /* linefeed */
- #define CR 13 /* carriage return */
- #define ESCAPE 27 /* escape */
- #define QUOTE 34 /* " (double quote) */
-
- // Scancodes (rawkey)
- #define SCAN_UP (0x4c)
- #define SCAN_DOWN (0x4d)
- #define SCAN_ESCAPE (0x45)
- #define SCAN_HELP (0x5f)
-
- #define GREY 0
- #define BLACK 1
- #define WHITE 2
- #define RED 3
- #define BLUE 4
- #define LIGHTGREY 5
- #define ORANGE 6
- #define YELLOW 7
- #define LIGHTGREEN 14
-
- #define MAXELEMENTS 14 // counting from 0
-
- #define TITLEBARTEXT "Report+ 5.02"
-
- #define FIRSTQUALIFIER 0x61
- #define LASTQUALIFIER 0x67
- #define KEYUP 0x80 /* key release */
-
- #define MN_PROJECT 0
- #define MN_HELP 1
-
- #define IN_NEW 0
- #define IN_OPEN 1
- #define IN_SAVE 3
- #define IN_SAVEAS 4
- #define IN_QUIT 6
-
- #define IN_MANUAL 0
- #define IN_ABOUT 2
-
- AGLOBAL void report1(void);
- AGLOBAL void report_loop(ULONG class, struct Gadget* addr, UWORD code, UWORD qual);
- AGLOBAL void report_exit(void);
- AGLOBAL void report_init(void);
- AGLOBAL void sender(void);
- AGLOBAL void config(void);
- AGLOBAL void newreport(ABOOL display);
- AGLOBAL void openreport(void);
- AGLOBAL void savereport(ABOOL saveas);
- AGLOBAL void loadreport(void);
-
- AGLOBAL void aminet_init(void);
- AGLOBAL void aminet_die(void);
- AGLOBAL void aminet1(void);
- AGLOBAL void aminet_loop(ULONG class, struct Gadget* addr, UWORD code, UWORD qual);
- AGLOBAL void aminet_exit(void);
- AGLOBAL void newaminet(ABOOL display);
- AGLOBAL void openaminet(void);
- AGLOBAL void saveaminet(ABOOL saveas);
- AGLOBAL void loadaminet(void);
- AGLOBAL ULONG Hook2Func(struct Hook* h, VOID* o, VOID* msg);
-
- AGLOBAL void acse1(void);
- AGLOBAL void acse2(void);
- AGLOBAL void acse3(void);
- AGLOBAL void acse_exit(void);
- AGLOBAL void decrypt(void);
- AGLOBAL void acse_loop(ULONG class, struct Gadget* addr, UWORD code);
-
- AGLOBAL void autodoc_init(void);
- AGLOBAL void autodoc1(void);
- AGLOBAL void newautodoc(ABOOL display);
- AGLOBAL void openautodoc(void);
- AGLOBAL void saveautodoc(ABOOL saveas);
- AGLOBAL void autodoc_loop(ULONG class, struct Gadget* addr, UWORD code);
-
- AGLOBAL void manuf1(void);
- AGLOBAL void runquery(ULONG querymanuf, ULONG queryproduct);
- AGLOBAL void updatemanuf(void);
- AGLOBAL void manuf_loop(ULONG class, struct Gadget* addr, UWORD code);
-
- AGLOBAL void iff1(void);
- AGLOBAL void iff_loop(ULONG class, struct Gadget* addr, UWORD code, UWORD qual);
-
- AGLOBAL void eol1(void);
- AGLOBAL void eol2(void);
- AGLOBAL void eolconvert(ABOOL gui);
- AGLOBAL void eol_loop(ULONG class, struct Gadget* addr, UWORD code, UWORD qual);
- AGLOBAL void eol_die(void);
-
- AGLOBAL void size_init(void);
- AGLOBAL void size_die(void);
- AGLOBAL void size1(void);
- AGLOBAL void updatesize(void);
- AGLOBAL void size_loop(ULONG class, struct Gadget* addr, UWORD code, UWORD qual);
- AGLOBAL void size_exit(void);
-
- AGLOBAL void batt_init(void);
- AGLOBAL void batt1(void);
- AGLOBAL void batt_loop(ULONG class, struct Gadget* addr, UWORD code, UWORD qual, SWORD mousex, SWORD mousey);
- AGLOBAL void batt_open(void);
- AGLOBAL void batt_save(ABOOL saveas);
- AGLOBAL void writebatt(ABOOL verify);
-
- AGLOBAL void files1(void);
- AGLOBAL void files_loop(ULONG class, struct Gadget* addr, UWORD code, UWORD qual);
- AGLOBAL void files_init(void);
- AGLOBAL void files_exit(void);
- AGLOBAL void files_die(void);
-
- AGLOBAL void agdb1(void);
- AGLOBAL void agdb_loop(ULONG class, struct Gadget* addr, UWORD code);
- AGLOBAL void newagdb(ABOOL display);
- AGLOBAL void openagdb(void);
- AGLOBAL void saveagdb(ABOOL saveas);
- AGLOBAL void loadagdb(void);
-
- AGLOBAL void icon1(void);
- AGLOBAL void icon2(void);
- AGLOBAL void iconconvert(ABOOL gui);
- AGLOBAL void icon_loop(ULONG gid);
- AGLOBAL void icon_do(void);
- AGLOBAL void icon_die(void);
- AGLOBAL ULONG Hook12Func(struct Hook* h, VOID* o, VOID* msg);
-
- // rp.c
- AGLOBAL void outputasl(void);
- AGLOBAL void outputstring(void);
- AGLOBAL void fliplog(ABOOL keyboard);
- AGLOBAL void getdate(void);
- AGLOBAL void loop(void);
- AGLOBAL void navigate(void);
- AGLOBAL void rq(STRPTR text);
- AGLOBAL void cleanexit(SBYTE rc);
- AGLOBAL void closewindow(void);
- AGLOBAL void FreeNameNodes(struct List* ListPtr);
- AGLOBAL ABOOL asl(void);
- AGLOBAL void launcheditor(STRPTR pathname);
- AGLOBAL void readordie(STRPTR pathname);
- AGLOBAL void writeout(STRPTR pathname); // remember write() is reserved
- AGLOBAL ABOOL readin(STRPTR pathname);
- AGLOBAL void verynewwindow(SWORD width, SWORD height, STRPTR title, ULONG idcmp);
- AGLOBAL void setgadget(WORD leftx, WORD topy, WORD width, WORD height, STRPTR text,
- ULONG flags);
- AGLOBAL void append(STRPTR pathname);
- AGLOBAL ULONG checkbreak(void);
- AGLOBAL void clearlist(struct List*);
- AGLOBAL ABOOL aboutloop(void);
- AGLOBAL VOID DrawGels(void);
- AGLOBAL void AddNameToTail(struct List* ListPtr, STRPTR name);
- AGLOBAL void drawgadgets(WORD gadgets);
- AGLOBAL void parse(STRPTR terminator);
- AGLOBAL void parsetoend(void);
- AGLOBAL ABOOL saveasl(STRPTR message);
- AGLOBAL void handlemenus(UWORD code);
- AGLOBAL void gadtools(void);
- AGLOBAL void lockscreen(void);
- AGLOBAL void unlockscreen(void);
- AGLOBAL void getfillcolour(void);
- AGLOBAL void multiasl(STRPTR pattern);
- AGLOBAL void convert(ABOOL gui);
- AGLOBAL void checkabort(ABOOL gui);
- AGLOBAL void InitHook(struct Hook* hook, ULONG (*func)(), void* data);
- AGLOBAL ULONG Hook0Func(struct Hook* h, VOID* o, VOID* msg);
- AGLOBAL ULONG ASM hookEntry(REG(a0) struct Hook *h, REG(a2) VOID *o, REG(a1) VOID *msg);
- AGLOBAL void helpabout(void);
- AGLOBAL void clearreactionlist(struct List* ListPtr);
- AGLOBAL void textedit(void);
-
- #define REPORTHEIGHT 256 /* page 11 */
- #define REPORTWIDTH 640 /* page 11 */
- #define SENDERWIDTH 442 /* page 12 */
- #define SENDERHEIGHT 124 /* page 12 */
- #define CONFIGWIDTH 640 /* page 13 */
- #define CONFIGHEIGHT 198 /* page 13 */
-
- #define AMINETWIDTH 640 // page 21
- #define AMINETHEIGHT 256 // page 21
-
- #define ACSE1WIDTH 640 /* page 31 */
- #define ACSE1HEIGHT 192 /* page 31 */
- #define ACSE2WIDTH 600 /* page 32 */
- #define ACSE2HEIGHT 126 /* page 32 */
- #define ACSE3WIDTH 600 /* page 33 */
- #define ACSE3HEIGHT 94 /* page 33 */
-
- #define AUTODOCWIDTH 640 /* page 41 */
- #define AUTODOCHEIGHT 256 /* page 41 */
-
- #define MANUF1HEIGHT 114 /* page 51 */
- #define MANUF1WIDTH 640 /* page 51 */
-
- #define IFF1WIDTH 640 /* page 61 */
- #define IFF1HEIGHT 256 /* page 61 */
-
- #define EOL1WIDTH 540 /* page 71 */
- #define EOL1HEIGHT 198 /* page 71 */
-
- #define SIZE1HEIGHT 512 /* page 81 */
- #define SIZE1WIDTH 640 /* page 81 */
-
- #define BATT1HEIGHT 166 /* page 91 */
- #define BATT1WIDTH 640 /* page 91 */
-
- #define FILES1WIDTH 528 /* page 101 */
- #define FILES1HEIGHT 256 /* page 101 */
-
- #define AGDBWIDTH 508 /* page 111 */
- #define AGDBHEIGHT 256 /* page 111 */
-
- #define MEDFIELD 32
- #define LONGFIELD 64
- #define VLONGFIELD 254
- #define LONGESTFIELD 16536
-
- AGLOBAL struct SharedStruct
- { ABOOL log;
- UWORD function;
- TEXT editor[VLONGFIELD + 1],
- output[VLONGFIELD + 1],
- pathname[4096 + 1], /* <= 4K total of pathnames */
- finallist[4096 + 1],
- thisfile[VLONGFIELD + 1], /* <= 254 characters per pathname */
- thatfile[VLONGFIELD + 1];
- };
-
- /* struct NameNode is simply an extended Node structure: a Node structure
- followed by 96 bytes which hold the name of the node. This is so that the
- NameNode structure can hold everything relevant to the node. */
- AGLOBAL struct NameNode
- { struct Node nn_Node;
- TEXT nn_Data[96];
- /* It must be long enough that you can hold a long pathname, longer than
- will fit on the display, because it needs to be accurately compared
- with the built-in list of system files. It needs to be at least as
- long as the longest of those built-in files, plus 5 extra characters
- for the .info extension. */
- };
- AGLOBAL struct ReportStruct
- { ABOOL loaded;
- ULONG floppies;
- UWORD agnus, denise, cpu, model, type, severity, subsystem;
- TEXT chipram[5], fastram[5],
- hard[MEDFIELD + 1],
- debug[LONGFIELD + 1],
- developer[LONGFIELD + 1],
- expansion[LONGFIELD + 1],
- summary[LONGFIELD + 1],
- ks[6],
- wb[6],
- pv[LONGFIELD + 1],
- pp[LONGFIELD + 1],
- thirdname[MEDFIELD + 1],
- thirdver[MEDFIELD + 1],
- thirdmanuf[MEDFIELD + 1],
- lastname[MEDFIELD + 1],
- firstname[MEDFIELD + 1],
- company[MEDFIELD + 1],
- phone[MEDFIELD + 1],
- email[MEDFIELD + 1],
- refer[VLONGFIELD + 1],
- referid[VLONGFIELD + 1],
- path[VLONGFIELD + 1],
- config[VLONGFIELD + 1],
- textfield[6][4096],
- output[VLONGFIELD + 1];
- };
- AGLOBAL struct AminetStruct
- { TEXT amishort[41], // `short' is a reserved keyword, of course
- uploader[41],
- author[41],
- requires[41],
- version[41],
- distribution[41],
- type[11], // ____/_____\n
- replaces[41],
- output[VLONGFIELD + 1],
- textfield[4096];
- ULONG maintype,
- subtype;
- ABOOL loaded;
- };
- AGLOBAL struct AutodocStruct
- { ULONG version;
- ABOOL loaded;
- TEXT library[MEDFIELD + 1], /* eg. workbench.library */
- function[MEDFIELD + 1],
- description[VLONGFIELD + 1],
- output[VLONGFIELD + 1],
- textfield[5][4096];
- struct
- { TEXT name[MEDFIELD + 1],
- type[MEDFIELD + 1],
- reg[MEDFIELD + 1],
- desc[4096];
- } var[9];
- };
- AGLOBAL struct IFFStruct
- { ABOOL cd, rkm, obsolete, private, proposal, reserved, standard, unregistered;
- TEXT pathname[VLONGFIELD + 1];
- };
- AGLOBAL struct AGDBStruct
- { TEXT title[MEDFIELD + 1], // `short' is a reserved keyword, of course
- publisher[MEDFIELD + 1],
- players[MEDFIELD + 1],
- hdinstallable[MEDFIELD + 1],
- compatibility[MEDFIELD + 1],
- gametype[MEDFIELD + 1],
- output[VLONGFIELD + 1],
- textfield[4096];
- ABOOL loaded;
- };
- AGLOBAL struct IconStruct
- { ULONG optimize, planar, // these must be ULONG not ABOOL nor BOOL!
- type; // this must be ULONG not UWORD!
- };
-